package com.bmadmin.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bmadmin.domain.LayUiDataTablePOJO;
import com.bmadmin.domain.MainDbDomain;
import com.bmadmin.domain.NoticeDomain;
import com.bmadmin.domain.SxdlDomain;
import com.bmadmin.domain.SxxlDomain;
import com.bmadmin.domain.SxxlUserDomain;
import com.bmadmin.domain.SysDepartmentsPOJO;
import com.bmadmin.domain.TysxDomain;
import com.bmadmin.mapper.TysxDao;
import com.bmadmin.service.TysxService;
@Service
@Transactional
public class TysxServiceImpl implements TysxService {
	@Autowired
	TysxDao tysxDao;
	
	public List<TysxDomain> getTysxApplyList(Map map){
		return tysxDao.getTysxApplyList(map);
	}
	
	public LayUiDataTablePOJO getSxdlList(){
		LayUiDataTablePOJO result = new LayUiDataTablePOJO();

        List<SxdlDomain> list = tysxDao.getSxdlList();
        result.setCode(0);
        result.setMsg("查询成功");
        result.setData(list);
        result.setCount(list.size());

        return result;
	}
	
	public LayUiDataTablePOJO getSxxlList(String sxdl_dm){
		LayUiDataTablePOJO result = new LayUiDataTablePOJO();

        List<SxxlDomain> list = tysxDao.getSxxlList(sxdl_dm);
        result.setCode(0);
        result.setMsg("查询成功");
        result.setData(list);
        result.setCount(list.size());

        return result;
	}
	
	public LayUiDataTablePOJO getSxxlUserList(String sxxl_dm){
		LayUiDataTablePOJO result = new LayUiDataTablePOJO();

        List<SxxlUserDomain> list = tysxDao.getSxxlUserList(sxxl_dm);
        result.setCode(0);
        result.setMsg("查询成功");
        result.setData(list);
        result.setCount(list.size());

        return result;
	}
	
	public LayUiDataTablePOJO getSxxlUserDepname(String userid){
		String depname = tysxDao.getSxxlUserDepname(userid);
		LayUiDataTablePOJO result = new LayUiDataTablePOJO();
		result.setCode(0);
        result.setMsg(depname);

        return result;
	}
	
	public int upTysx(TysxDomain tysx){
		return tysxDao.upTysx(tysx);
	}
	
	public int insertTysx(TysxDomain tysx){
		return tysxDao.insertTysx(tysx);
	}
	
	public int deleteTysx(String n_id){
		return tysxDao.deleteTysx(n_id);
	}
	
	public int UpdateTysx(TysxDomain tysx){
		return tysxDao.UpdateTysx(tysx);
	}
	
	public int UpdateFileName(TysxDomain tysx){
		return tysxDao.UpdateFileName(tysx);
	}

	public int deleteFile(String n_id){
		return tysxDao.deleteFile(n_id);
	}
	
	public int sureTysx(TysxDomain tysx){
		return tysxDao.sureTysx(tysx);
	}
	
	public int verifyTysx(TysxDomain tysx){
		return tysxDao.verifyTysx(tysx);
	}
	
	public int receiveTysx(TysxDomain tysx){
		return tysxDao.receiveTysx(tysx);
	}
	
	public int UpdateBackFileName(TysxDomain tysx){
		return tysxDao.UpdateBackFileName(tysx);
	}
	
	public int deleteBackFile(String n_id){
		return tysxDao.deleteBackFile(n_id);
	}
	
	public int disposeTysx(TysxDomain tysx){
		return tysxDao.disposeTysx(tysx);
	}
	
	public LayUiDataTablePOJO getMainDbList(Map rs){
		LayUiDataTablePOJO result = new LayUiDataTablePOJO();

        List<MainDbDomain> list = tysxDao.getMainDbList(rs);
        result.setCode(0);
        result.setMsg("查询成功");
        result.setData(list);
        result.setCount(list.size());

        return result;
	}
}
